home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
tbbs
/
prgsourc.zip
/
HOMES.ZIP
/
MAKE.PRG
< prev
next >
Wrap
Text File
|
1996-01-09
|
7KB
|
215 lines
DO cls WITH 0,0,23,79
file = "C:\HOMEBASE\TEXT\homebase.txt"
FCREATE fil (file) 13 0 2048
IF fil < 0
SET COLOR TO W+/N
ecode = Ferror()
@ 20,5 SAY "Error creating file: " + Message(ecode)
key = InKey(5)
ok = .F.
RETURN
ENDIF
FLWRITE fil rite " HomeBase, The Real Estate Database" + Chr(13) + Chr(10)
SELECT a
SET ORDER TO 2
y = 1
DO WHILE .T.
SEEK tarray[y]
IF tarray[y] = "EMPTY"
EXIT
ENDIF
FLWRITE fil rite Chr(13)
FLWRITE fil rite "Listing #" + homes + pic1 + Chr(13)
IF rite < 1
FCLOSE fil
ok = .F.
RETURN
ENDIF
x = 1
DO WHILE x < 7
DO CASE
CASE x = 1
line = "Price: $" + LJust(Str(price)) + " " + sub + Chr(13)
CASE x = 2
line = RTrim(exterior) + " " + RTrim(design) + Chr(13)
CASE x = 3
line = Str(size) + " sq. feet" + Chr(13)
CASE x = 4
line = "Lot Size: " + Ltrim(Str(acres)) + " acres" + Chr(13)
CASE x = 5
line = "Bedrooms: " + Ltrim(Str(beds)) + Chr(13)
CASE x = 6
line = "Bathrooms: " + Ltrim(Str(baths)) + Chr(13)
ENDCASE
x = x + 1
FLWRITE fil rite line
IF rite < 1
FCLOSE fil
ok = .F.
RETURN
ENDIF
ENDDO
IF garage
IF basement
IF ac
IF heatpump
IF heat # "Heat Pump"
line = "Features: garage, basement, central air, Heat Pump, " + Rtrim(heat) + " backup" + Chr(13)
ELSE
line = "Features: garage, basement, central air, Heat Pump" + Chr(13)
ENDIF
ELSE
line = "Features: garage, basement, central air, " + Rtrim(heat) + " heat" + Chr(13)
ENDIF
ELSE
IF heatpump
IF heat # "Heat Pump"
line = "Features: garage, basement, Heat Pump, " + Rtrim(heat) + " backup" + Chr(13)
ELSE
line = "Features: garage, basement, Heat Pump" + Chr(13)
ENDIF
ELSE
line = "Features: garage, basement, " + Rtrim(heat) + " heat" + Chr(13)
ENDIF
ENDIF
ELSE
IF ac
IF heatpump
IF heat # "Heat Pump"
line = "Features: garage, central air, Heat Pump, " + Rtrim(heat) + " backup" + Chr(13)
ELSE
line = "Features: garage, central air, Heat Pump" + Chr(13)
ENDIF
ELSE
line = "Features: garage, central air, " + Rtrim(heat) + " heat" + Chr(13)
ENDIF
ELSE
IF heatpump
IF heat # "Heat Pump"
line = "Features: garage, Heat Pump, " + Rtrim(heat) + " backup" + Chr(13)
ELSE
line = "Features: garage, Heat Pump" + Chr(13)
ENDIF
ELSE
line = "Features: garage, " + Rtrim(heat) + " heat" + Chr(13)
ENDIF
ENDIF
ENDIF
ELSE
IF basement
IF ac
IF heatpump
IF heat # "Heat Pump"
line = "Features: basement, central air, Heat Pump, " + Rtrim(heat) + " backup" + Chr(13)
ELSE
line = "Features: basement, central air, Heat Pump" + Chr(13)
ENDIF
ELSE
line = "Features: basement, central air, " + Rtrim(heat) + " heat" + Chr(13)
ENDIF
ELSE
IF heatpump
IF heat # "Heat Pump"
line = "Features: basement, Heat Pump, " + Rtrim(heat) + " backup" + Chr(13)
ELSE
line = "Features: basement, Heat Pump" + Chr(13)
ENDIF
ELSE
line = "Features: basement, " + Rtrim(heat) + " heat" + Chr(13)
ENDIF
ENDIF
ELSE
IF ac
IF heatpump
IF heat # "Heat Pump"
line = "Features: central air, Heat Pump, " + Rtrim(heat) + " backup" + Chr(13)
ELSE
line = "Features: central air, Heat Pump" + Chr(13)
ENDIF
ELSE
line = "Features: central air, " + Rtrim(heat) + " heat" + Chr(13)
ENDIF
ELSE
IF heatpump
IF heat # "Heat Pump"
line = "Heat: Heat Pump, " + Rtrim(heat) + " backup" + Chr(13)
ELSE
line = "Heat: Heat Pump" + Chr(13)
ENDIF
ELSE
line = "Heat: " + Rtrim(heat) + Chr(13)
ENDIF
ENDIF
ENDIF
ENDIF
FLWRITE fil rite line
IF rite < 1
FCLOSE fil
ok = .F.
RETURN
ENDIF
IF fireplace # 0
IF fireplace = 1
line = " and fireplace" + Chr(13)
ELSE
line = " and " + Ltrim(Str(fireplace)) + " fireplaces" + Chr(13)
ENDIF
ELSE
line = Chr(13)
ENDIF
FLWRITE fil rite line
IF rite < 1
FCLOSE fil
ok = .F.
RETURN
ENDIF
FLWRITE fil rite Chr(13)
FLWRITE fil rite memo1 + Chr(13)
FLWRITE fil rite memo2 + Chr(13)
FLWRITE fil rite memo3 + Chr(13) + Chr(13)
IF rite < 1
FCLOSE fil
ok = .F.
RETURN
ENDIF
SELECT c
SEEK a->broker
IF Found()
FLWRITE fil rite "Listing Agent: " + Rtrim(uname) + " " + homeph + Chr(13)
FLWRITE fil rite "Agency: " + agency + " " + phone1 + Chr(13)
FLWRITE fil rite " " + address + phone2 + Chr(13) + Chr(13)
FLWRITE fil rite " " + city + Chr(13) + Chr(13)
IF rite < 1
FCLOSE fil
ok = .F.
RETURN
ENDIF
ENDIF
SELECT a
SET COLOR TO W+/N
IF y<22
@ y,5 SAY "Listing" + LTrim(Str(y)) + "created"
ELSE
@ y-21,5 SAY "Listing" + LTrim(Str(y)) + "created"
ENDIF
key = inkey(1)
y = y + 1
ENDDO
FLWRITE fil rite Chr(13) + Chr(13)
FLWRITE fil rite " LocalNet BBS, Powhatan, Virginia" + Chr(13)
FLWRITE fil rite " BBS: (804) 598-2817" + Chr(13)
FLWRITE fil rite " Voice: (804) 598-2687" + Chr(13)
IF rite < 1
FCLOSE fil
ok = .F.
RETURN
ENDIF
FCLOSE fil
ok = .T.
RETURN